// 导入 request 模块
import request from "@/utils/request.js";

// 查询用户地址
export const addressListService = () => {
    return request.get('address')
}
// 根据用户id查询地址详情
export const addressInfoService = (id) => {
    return request.get(`address/${id}`)
}
// 添加用户地址
export const addressAddService = (data) => {
    return request.post('address', data)
}
// 修改用户地址
export const addressUpdateService = (data) => {
    return request.put(`address`, data)
}
// 删除用户地址
export const addressDeleteService = (id) => {
    return request.delete(`address/${id}`)
}
// 设置默认地址
export const addressDefaultService = (id) => {
    return request.put(`address/${id}/default`)
}